#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

typedef long long ll;

bool is_prime(ll n)
{
    if (n < 2) return false;

    for (int i = 2; i * i <= n; i++)
    {
        if (n % i == 0)
        {
            return false;
        }
    }

    return true;
}


int main() {

    ll n1, n2;
    cin >> n1;
    n2 = n1;

    n1 /= 10;

    while (n1)
    {
        int x = n1 % 10;
        n2 = n2 * 10 + x;
        n1 /= 10;
    }

    if (is_prime(n2))
    {
        cout << "prime" << endl;
    }
    else
    {
        cout << "noprime" << endl;
    }

    return 0;
}

typedef pair<int, int> PII;

const int N = 2e5 + 10;
int n;
PII arr[N];

int main() {

    cin >> n;
    for (int i = 0; i < n; i++) { cin >> arr[i].first >> arr[i].second; }

    sort(arr, arr + n);
    int ret = 0, r = arr[0].second;

    for (int i = 1; i < n; i++)
    {
        if (arr[i].first < r) { r = min(r, arr[i].second); }
        else
        {
            ret++;
            r = arr[i].second;
        }
    }

    cout << ++ret << endl;
    return 0;
}

